import { HTTP } from '../utils/http.js'
class likeModel extends HTTP {
  like(like, art_id,art_type) {
    let url = like == 'like' ? 'like' :'like/cancel'
    this.request({
      url:url,
      method:'POST',
      data:{
        art_id: art_id,
        type: art_type
      }
    })
  }
  likeFavor(type, id, sCallback){
    this.request({
      url: 'classic/' + type + '/' + id +'/favor',
      success:(res)=>{
        sCallback(res)
      }
    })
  }


}
export { likeModel }